package chen.nf.util.result;

import chen.nf.util.ResultSetHandler;
import chen.nf.util.RowProcessor;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @Author czl
 * @Date 2024-05-10
 */
public class ArrayHandler implements ResultSetHandler<Object[]> {
    @Override
    public Object[] handle(ResultSet rs) throws SQLException {
        return rs.next() ? RowProcessor.toArray(rs) : null;
    }
}
